import { getRequest } from "/@/lib/axios";
import { postRequest } from "/src/lib/axios";
export const upstream = {
	query: (param) => {
		return postRequest("/emissionData/queryPage", {
			...param, "searchCount": true,
			sortItemList: [
				{
					isAsc: true,
					column: "emission_data_id"
				}
			]
		});
	},
	Add: (param) => {
		return postRequest("/emissionData/add", param);
	},
	queryactivityTypes: (param) => {
		return postRequest("/activityTypes/queryPage", {
			...param,
			searchCount: true,
			sortItemList: [
				{
					isAsc: true,
					column: "activity_types_id"
				}
			]
		})
	},
	queryactivityCategories: (param) => {
		return postRequest("/activityCategories/queryPage", {
			...param, "searchCount": true,
			sortItemList: [
				{
					isAsc: true,
					column: "activity_categories_id"
				}
			]
		})
	},
	update: (param) => {
		return postRequest("/purchasedEnergyEmissionData/update", param)
	},
	DElete: (emissionDataId) => {
		return getRequest("/emissionData/delete/" + emissionDataId)
	}
};
